<?php 

require ('../include/web.init.inc.php');
extract ( $_POST);
header("Content-type: application/json");
$card = Card::getCardBySim ( $sim );


if ($card == null) {
	$ret = json_encode(array("code"=>-1,"data"=>array('a' => 1)));	
}
// else if (strtotime($card["dead_time"]) < time()) {
// 	$ret = json_encode(array("code"=>-2,"data"=>$card));
// }
else if ($card["open_time"] == null) {
	$ret = json_encode(array("code"=>0,"data"=>$card));		
}
else {
	$ret = json_encode(array("code"=>1,"data"=>$card));	
}

// if($user_info){

// }else{
// }else{
// 	$ret = json_encode(array("code"=>0,"msg"=>"用户名密码错误"));
// }

echo $ret;
